import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    children: [
      {
        path: '/',
        component: () => import('../views/Home_cont.vue'),
        meta:{
          title:"首页"
        }
      }
    ]
  },
  {
    path: '/function_table',
    component: Home,
    children: [
      {
        path: '/',
        component: () => import('../views/function/table/Function_table.vue'),
        meta: {
          title: "缺陷查询统计"
        }
      }
    ]
  },
  {
    path: '/function_serch',
    component: Home,
    children: [
      {
        path: '/',
        component: () => import('../views/function/detection/Function_serch.vue'),
        meta: {
          title: "产品履历查询"
        }
      }
    ]
  },
  {
    path: '/function_produce',
    component: Home,
    children: [
      {
        path: '/',
        component: () => import('../views/function/produce/Function_produce.vue'),
        meta: {
          title: "单一产品缺陷分析"
        }
      }
    ]
  },
  {
    path: '/function_drawback',
    component: Home,
    children: [
      {
        path: '/',
        component: () => import('../views/function/drawback/Function_drawback.vue'),
        meta: {
          title: "缺陷密集性分析"
        }
      }
    ]
  },
  
  {
    path: '/function_statis',
    component: Home,
    children: [
      {
        path: '/',
        component: () => import('../views/function/statis/Function_statis.vue'),
        meta: {
          title: '产能统计'
        }
      }
    ]
  },
  {
    path: '/function_facility',
    component: Home,
    children: [
      {
        path: '/',
        component: () => import('../views/function/facity/Function_facility.vue'),
        meta: {
          title: '设备密集性分析'
        }
      }
    ]
  },
  {
    path:'/function_staff',
    component: Home,
    children: [
      {
        path: '/',
        component: () => import('../views/function/staff/Function_staff.vue'),
        meta: {
          title: '复判人员密集性分析'
        }
      }
    ]
  },
  {
    path:'/function_capacity',
    component: Home,
    children: [
      {
        path: '/',
        component: () => import('../views/function/acpacity/Function_capacity.vue'),
        meta: {
          title: '缺陷对比分析'
        }
      }
    ]
  },
  {
    path:'/function_glo',
    component: Home,
    children: [
      {
        path: '/',
        component: () => import('../views/function/glo/Function_glo.vue'),
        meta: {
          title: '产能对比分析'
        }
      }
    ]
  },
  {
    path:'/function_query',
    component: Home,
    children: [
      {
        path: '/',
        component: () => import('../views/function/aquery/Function_query.vue'),
        meta: {
          title: '复判人员产能统计'
        }
      }
    ]
  },
  {
    path:'/function_warning',
    name:'function_warning',
    component: () => import('../views/function/warning/Function_warning.vue'),
    // component: Home,
    // children: [
    //   {
    //     path: '/',
    //     meta: {
    //       title: '连续预警'
    //     }
    //   }
    // ]
  },
  {
    path:"/function_imgwarning",
    name:"function_imgwarning",
    component: () => import('../views/function/Imgwranig/Function_imgwarning.vue'),
    // component:Home,
    // children:[
    //   {
    //     path: '/',
    //     meta: {
    //       title: '连续图像预警'
    //     }
    //   }
    // ]
  },
  {
    
    path:'/real-time',
    name:"Real-time",
    component:()=>import('../views/function/Real-time/Real-time.vue')
  },
  {
     path:'/ren_item',
     name:"Ren_item",
     component:()=>import('../views/function/ren_item/Ren_item.vue')
  },

  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  }
]

const router = new VueRouter({
  // mode: 'Hash',
  // base: process.env.BASE_URL,
  routes
})

export default router
